<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="utf-8"%>
<%@ include file="/public/pathvariable.jsp" %>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
		<title>报告列表</title>
		<link rel="stylesheet" href="<%=basePath %>css/style.css">
		<link rel="stylesheet" href="<%=basePath %>css/msg.css">
		<link rel="stylesheet" href="<%=basePath %>css/ui_base.css">
		<link rel="stylesheet" href="<%=basePath %>css/f_style.css">
		<style>
			.strWidth{width:90px !important;}
			.unitWidth{margin-right:20px;width:auto !important;}
			.btnWidth{width:100px !important;}
			label{display:block;color:red;}
			form{position:relative;width:90%;margin:0 auto;}
			#importExcel{margin:30px auto;width:100%;}
			.f_div{width:72%;margin:10px auto;height:120px;}
			.tc{text-align: center !important;}
			.t_bleft .ui_btn{margin: 0 5px !important;}
		</style>
		<script>
			function jsCk(t) {
				if(!/^[1-9][0-9]*$/g.test(t.value)) {
					t.value = "";
					return false;
				}
			}
		</script>
	</head>

	<body ng-app="listApp">
		<!--抬头bar-->
		<jsp:include page="/public/header.jsp" />
		<div class="main w clearfix">
			<!--主窗口-->
			<div class="class_rg" ng-controller="tableCtrl" style="width:1200px">
				<!--内容区-->
				<div class="path_">
					<a href="<%=basePath %>index.jsp?parId=0">首页</a> > <a href="<%=basePath %>report/index.jsp?parId=3">报告管理</a> > <a href="<%=basePath %>report/reportList.jsp?parId=302">报告列表</a> 
				</div>
				<div class="Top_cag">
					<div class="t_bleft fl" style="width:930px;">
						<div class="fl mbine unitWidth">
							<strong class="th">报告名称 </strong>
							<input type="text" class="ui_text" ng-model="vm.name">
						</div>
						<div class="fl mbine unitWidth">
                            <strong class="th strWidth">所属组织 </strong>
                            <input type="hidden" ng-model="vm.groupId" id="groupIds">
                            <div ag-selectc style="display:inline" ajaxs="<%=basePath%>group/selectAllName" group-id="vm.groupId"></div>
                        </div>
						<div class="fl mbine unitWidth">
							<strong class="th" style="float:left">报告周期</strong>
							<div class="ui_select_msg selectListObj" style="float:left;" >
                                <input type="hidden" id="reportSelects" value="" autocomplete="off" />
                                <span class="ui_s_t_msg" >全部</span>
                                <div class="ui_s_bk_msg" style="display: none;z-index:99;">
                                    <a href="javascript:void(0)" type="">全部</a>
                                    <a href="javascript:void(0)" type="1">日报</a>
                                    <a href="javascript:void(0)" type="2">周报</a>
                                	<a href="javascript:void(0)" type="3">月报</a>
                                </div>
                            </div>
						</div>
						<div class="divline v5"></div>
						<div class="fl mbine unitWidth">
							<strong class="th">生成时间 </strong>
							<input type="text" class="ui_text str_t" id="start_t" readonly="true" >-<input
							 type="text" class="ui_text str_t" id="end_t" readonly="true" >
						</div>
						<div class="fl mbine unitWidth">
                            <strong class="th strWidth">所属用户 </strong>
                            <input type="hidden" ng-model="vm.userId" id="userIds">
                            <div ag-selectd style="display:inline;" ajaxs="<%=basePath%>user/selectByGroupId.do" user-id="vm.userId"></div>
                        </div>
					</div>
					<div class="t_bleft fl" style="padding:5px 0 0 0;width:220px;">
						<a href="javascript:void(0);" class="ui_btn green" ng-click="getAjax()" id="Msearch">查询</a>
					</div>
				</div>
				<div class="msg_class_table">
					<div class="title">报告列表</div>
					<table width="100%" border="0" cellspacing="1" cellpadding="0" class="dtab">
						<tr class="th">
							<th scope="col" width="200" class="tc">报告名称</th>
							<th scope="col" width="200" class="tc">所属组织</th>
							<th scope="col" width="200" class="tc">所属用户</th>
							<th scope="col" width="150" class="tc">报告周期</th>
							<th scope="col" width="200" class="tc">生成时间</th>
							<th scope="col" class="tc">操作</th>
						</tr>
						<div id="waiting" ng-show='dLoading'>  
						    <img src="<%=basePath %>js/layer/skin/default/xubox_loading0.gif"> 
						</div>
						<tr class="td" ng-repeat="key in datas">
							<td class="tc">
								<span title="{{key.name}}" ng-bind="key.name" style="width:197px;overflow:hidden; white-space:nowrap;text-overflow:ellipsis;display:block;"></span>
							</td>
							<td class="tc">
								<span title="{{key.groupName}}" ng-bind="key.groupName" style="width:197px;overflow:hidden; white-space:nowrap;text-overflow:ellipsis;display:block;"></span>
							</td>
							<td class="tc">
								<span title="{{key.users}}" ng-bind="key.users" style="width:197px;overflow:hidden; white-space:nowrap;text-overflow:ellipsis;display:block;"></span>
							</td>
							<td class="tc">
								<span ng-bind="key.cycleName"></span>
							</td>
							<td class="tc">
								<span ng-bind="key.createTime" title="{{key.createTime}}" class="text_sub4"></span>
							</td>
							<td class="tc">
								<form name='form' action='reportListShow.jsp' method='post' style="display:inline;" target="_blank">  
									<input type='hidden' name='parId' value='{{addparid}}'/> 
									<input type='hidden' name='rptId' value='{{key.id}}'/>  
									<input type='hidden' name='moduleId' value='{{key.moduleSort}}'/>  
									<input type='hidden' name='rptCycleId' value='{{key.cycleId}}'/>  
									<input type='hidden' name='rptName' value='{{key.name}}'/>
									<a ng-if="selectH" href="javascript:document.form.submit();" class="green">预览</a>  
									<a ng-if="!selectH" href="javascript:document.form[{{datas.indexOf(key)}}].submit();" class="green">预览</a>&nbsp;&nbsp;
								</form>
								<a href="javascript:void(0)" ng-click="domAjax('del',key.id,key.name,key.groupName)" class="green" id="delBtn">删除</a>
							</td>
						</tr> 
						<tr class="pages">
							<td colspan="6">
	                        	<div class="ui_page">
	                            	<span class="ic fl pr20">共 <b ng-bind="datasPage.totalRecords"></b> 条记录</span>
	                                <span class="sw fl pr20" id="jssum">显示 <a ng-class="$index==0?'cur':''" ng-repeat="key in [10,20,50,100]" ng-bind="key" pagen> </a></span>
	                                <span class="gopg fr">跳转到<input type="button" class="btn" value="go" ng-click="goAjax()"><input type="text" min="1" class="txt" ng-model="keyInt" onkeyup="jsCk(this)"></span>
	                                <div class="pg fr" id="jsgo">
	                                	<a href="javascript:void(0)" data-href="{{prevIndex}}" class="str" pageg ng-show="vm.pageIndex<2?false:true"><</a>
	                                    <a ng-class="key==vm.pageIndex?'cur':''" data-href="{{key}}" ng-repeat="key in pages" ng-bind="key" pageg> </a>
	                                    <a href="javascript:void(0)" data-href="{{nextIndex}}" class="end" pageg ng-show="vm.pageIndex>pages_e-1?false:true">></a>
	                                </div>
	                            </div>
	                        </td>
	                    </tr>
					</table>
				</div>
				<!--内容区-->
			</div>
		</div>
		
		<script src="<%=basePath %>js/jquery.min.1.8.2.js"></script>
		<script src="<%=basePath %>js/jquery.form.js"></script>  
	    <script src="<%=basePath %>js/bootstrap/js/jquery.validate-1.7.js"></script>  
	    <script src="<%=basePath %>js/bootstrap/js/bootstrap.min.js"></script>  
	    <script src="<%=basePath %>js/bootstrap/js/fileinput.js"></script> 
		
		<script src="<%=basePath %>js/jquery.easing.1.3.js"></script>
		<script src="<%=basePath %>js/jquery.mousewheel.js"></script>
		<script src="<%=basePath %>js/layer/layer.min.js"></script>
		<script src="<%=basePath %>js/angular.min.1.2.5.js"></script>
		<script src="<%=basePath %>js/laydate/laydate.js"></script>
		<script src="<%=basePath %>js/config.js"></script>
		<script src="<%=basePath %>js/userSession.js"></script>
	 	<script src="<%=basePath %>report/js/angular.reportList.js"></script> 
		<link rel="stylesheet" href="<%=basePath %>js/Validation/css/validationEngine.jquery.css">
		<script src="<%=basePath %>js/Validation/js/jquery.validationEngine-zh_CN.js" defer="defer"></script>
		<script src="<%=basePath %>js/Validation/js/jquery.validationEngine.js" defer="defer"></script>
	</body>
</html>